import backpackerxl as xl


def evenNumbers():
    '''
    打印偶数
    '''
    count = 0
    for i in range(1, 101):
        if i % 2 != 0:
            continue
        xl.printNumber(i, count, 10, 35, 0.4)
        count += 1


def primeNumbers():
    '''
    打印素数
    '''
    count = 0
    for j in range(2, 100):
        if xl.isPrimeNumbers(j):
            continue
        xl.printNumber(j, count, 5, 36, 0.4)
        count += 1


def main():
    b = int(xl.inputColor("<<请选择>>\n1.打印偶数\n2.打印素数\n", 35))
    if b == 1:
        evenNumbers()
    elif b == 2:
        primeNumbers()
    else:
        xl.printColor("输入错误，请输入1或2", 31)


if __name__ == "__main__":
    main()
